<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<script src="<%=path %>/js/common.js"></script>
<div class="panel-heading">
	<h3 class="panel-title">活动列表</h3>
</div>
<div class="bd clearfix">
	<form id="admin_activity_choose_form" action="javascript:queryAdminActivityList(1);">
		<div class="filter-wrap">
			
			<dl class="clearfix invest-filter">
				<dt>活动名称</dt>
				<dd class="clearfix">
					<ul class="col-sm-5">
					<input type="text" class="form-control" name="newsTitle" value="${paramMap.activityName}" placeholder="请输入活动名称关键词">
					</ul>
				</dd>
			</dl>
			<d:radio describe="活动类型:" tableColumn="activity_type" fieldName="activityType" value="${paramMap.activityType}" type="query_single" queryFunction="queryAdminActivityList"></d:radio>
		</div>
		<div class="text-center pb20">
			<button class="btn btn-primary">搜索</button>
		</div>
	</form>
</div>
<c:choose>
<c:when test="${!empty dataList && fn:length(dataList) ne 0}">
<table class="table">
	<thead>
		<tr>
			<th width="80%">名称</th>
			<th width="10%">类型</th>
			<th width="10%">操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="activity" items="${dataList}" varStatus="index">
		<tr>
			<td class="title">
				<a href="<%=path %>/uncheck/activity/view/${activity.activityId}">${activity.activityName}</a>
			</td>
			<td>
				<c:choose>
					<c:when test="${activity.activityType==1}">线下活动</c:when>
					<c:when test="${activity.activityType==2}">线上直播</c:when>
				</c:choose>
			</td>
			<td>
				<a href="javascript:deleteActivityById('${activity.activityId}')">删除</a>
			</td>
		</tr>
		</c:forEach>
	</tbody>
</table>
<!-- 分页 -->
<p:pagination pageNo="${paramMap.pageNo}" pageCount="${paramMap.pageCount}" queryFunction="queryAdminActivityList" style="text-center"></p:pagination>
<!-- 分页 end -->
</c:when>
<c:otherwise>
	<table class="table">
		<thead>
			<tr>
				<th>标题</th>
				<th>类型</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td colspan="3" align="center">
					暂无数据
				</td>
			</tr>
		</tbody>
	</table>
</c:otherwise>
</c:choose>